-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rollup of 9 pull requests #137466
Rollup of 9 pull requests #137466
Conversation
… unix Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Include the match arm guard in the gated span, so that the suggestion to add a body is correct instead of inserting the body before the guard. Make the suggestion verbose. ``` error: `match` arm with no body --> $DIR/feature-gate-never_patterns.rs:43:9 | LL | Some(_) if false, | ^^^^^^^^^^^^^^^^ | help: add a body after the pattern | LL | Some(_) if false => { todo!() }, | ++++++++++++++ ```
[Debuginfo] Add MSVC Synthetic and Summary providers to LLDB Adds handling for `tuple$<>`, `ref$<slice$2<>`, `ref$<str$>` and `enum2$<>`. Also fixes a bug in MSVC vec/string handling where the script was unable to determine the element's type due to LLDB ignoring template arg debug information <details> <summary>Sample code</summary> ```rust pub enum Number { One = 57, Two = 99, } #[repr(u8)] pub enum Container { First(u32), Second { val: u64, val2: i8 }, Third, } ... let u8_val = b'a'; let float = 42.78000000000001; let tuple = (u8_val, float); let str_val = "eef"; let mut string = "freef".to_owned(); let mut_str = string.as_mut_str(); let array: [u8; 4] = [1, 2, 3, 4]; let ref_array = array.as_slice(); let mut array2: [u32; 4] = [1, 2, 3, 4]; let mut_array = array2.as_mut_slice(); let enum_val = Number::One; let mut enum_val2 = Number::Two; let sum_val = Container::First(15); let sum_val_2 = Container::Second { val: 0, val2: 0 }; let sum_val_3 = Container::Third; let non_zero = NonZeroU128::new(100).unwrap(); let large_discr = NonZeroU128::new(255); ``` </details> Before:  After:  try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1 try-job: i686-mingw try-job: aarch64-gnu
Replace mem::zeroed with mem::MaybeUninit::uninit for large struct in Unix As discussion in rust-lang#136737. - Replace `mem::zeroed()` with `MaybeUninit::uninit()` for `sockaddr_storage` in `accept()` and `recvfrom()` since these functions fill in the address structure - Replace `mem::zeroed()` with `MaybeUninit::uninit()` for `pthread_attr_t` in thread-related functions since `pthread_attr_init()` initializes the structure - Add references to man pages to document this behavior
More const {} init in thread_local `const {}` in `thread_local!` gets an optimization just based on the syntax, rather than the expression being const-compatible. This is easy to miss, so I've added more examples to the docs. I've also added `const {}` in a couple of places in std where this optimization has been missed.
…-2, r=saethlin,traviscross Greatly simplify lifetime captures in edition 2024 Remove most of the `+ Captures` and `+ '_` from the compiler, since they are now unnecessary with the new edition 2021 lifetime capture rules. Use some `+ 'tcx` and `+ 'static` rather than being overly verbose with precise capturing syntax.
…tep-doc, r=Kobzol bootstrap: add doc for vendor build step This PR adds docs for vendor build step.
…-errors Improve a bit HIR pretty printer This PR improve (a bit) the HIR pretty printer. It does so by: - Not printing elided lifetimes (those are not expressible in surface Rust anyway) - And by rendering implicit self with the shorthand syntax I also tried fixing some indentation and other things but gave up for now. Best reviewed commit by commit.
…rrors Fix "missing match arm body" suggestion involving `!` Include the match arm guard in the gated span, so that the suggestion to add a body is correct instead of inserting the body before the guard. Make the suggestion verbose. ``` error: `match` arm with no body --> $DIR/feature-gate-never_patterns.rs:43:9 | LL | Some(_) if false, | ^^^^^^^^^^^^^^^^ | help: add a body after the pattern | LL | Some(_) if false => { todo!() }, | ++++++++++++++ ``` r? `@compiler-errors`
… r=scottmcm Fix bugs due to unhandled `ControlFlow` in compiler Well, one bug and one nit.
Fix missing self subst when rendering `impl Fn*<T>` with no output type r? `@fmease` or reassign Fixes rust-lang#133597 cc rust-lang#137456
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: bb2cc59a21 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (1805b33): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 2.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeResults (primary -0.1%, secondary -0.2%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 770.69s -> 770.867s (0.02%) |
Successful merges:
!
#137435 (Fix "missing match arm body" suggestion involving!
)ControlFlow
in compiler #137448 (Fix bugs due to unhandledControlFlow
in compiler)impl Fn*<T>
with no output type #137458 (Fix missing self subst when renderingimpl Fn*<T>
with no output type)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup